package cn.lutu.security.security;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class CustomUserDetails extends User {

    private Long id;
    private String nickName;
    private String imgUrl;


    public CustomUserDetails(Long id,String username,String password,String nickName,String imgUrl, Collection<? extends GrantedAuthority> authorities) {
        super(username, password, true, true, true, true, authorities);
        this.id=id;
        this.nickName=nickName;
        this.imgUrl=imgUrl;
    }
}
